import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import home from '@/components/home'
import one from '@/components/one'
import two from '@/components/two'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/login',
      component: login
    },
    {
      path: '/home',
      redirect: '/home/one',
      component: home,
      children: [
        {
          path: 'one',
          component: one
        },
        {
          path: 'two',
          component: two
        }
      ]
    },
  ]
})
